package WorkComparator;

import java.util.Comparator;
public class Method implements Comparator<Supermarket>{
    public int compare(Supermarket o1,Supermarket o2){
        if (o1.getTotal() < o2.getTotal())
            return -1;
        else if (o1.getTotal() == o2.getTotal())
            return 0;
        else
            return 1;
    }
}
